﻿using habbo.Kernel.Packets.Interfaces;
using habbo.Kernel.Packets.Messages;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace habbo.Kernel.Packets.com.sulake.habbo.communication.messages.incoming.messenger
{
    class ChatWithFriendMessageEvent : IMessageEvent
    {
        public void Invoke(Network.Session Session, Messages.ClientPacket Packet)
        {
            int FriendId = Packet.PopFixedInt32();
            string Message = Packet.PopFixedString();



            ServerPacket msg = new ServerPacket(Headers.MessageComposerIds.ChatWithFriendMessageComposer);
            msg.Append(Session.getCharacter().Id);
            msg.Append(Message);
            msg.Append("");
            SystemApp.SocketSystem.GetSession(FriendId).Send(msg);

        }
    }
}
